

// 消息队列的常用API
#include <stdio.h>
// 过程中给以下文件添加了注释，如果运行出问题，在备份中取一个新的文件覆盖
#include "./src/kernel/liteos_m/kal/cmsis/cmsis_liteos2.c"
#include <unistd.h>

#include "ohos_init.h"
#include "cmsis_os2.h"
#include <unistd.h>
#include "hi_wifi_api.h"
//#include "wifi_sta.h"
#include "lwip/ip_addr.h"
#include "lwip/netifapi.h"

#include "lwip/sockets.h"

// 创建与删除

osMessageQueueId_t osMessageQueueNew(uint32_t queue_size, uint32_t msg_size, const osMessageQueueAttr_t *attr);
osStatus_t osMessageQueueDelete(osMessageQueueId_t queue_id);

// 发送与接收

osStatus_t osMessageQueueGet(osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout);
osStatus_t osMessageQueuePut(osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout);

// 控制

uint32_t osMessageQueueGetCapacity(osMessageQueueId_t mq_id);
uint32_t osMessageQueueGetMsgSize(osMessageQueueId_t mq_id);
uint32_t osMessageQueueGetCount(osMessageQueueId_t mq_id);
uint32_t osMessageQueueGetSpace(osMessageQueueId_t mq_id);
